import Layout from '@/views/layout/Layout'

const userRouter = [
  ///接单大厅
  {
    path: "/order_house",
    component: Layout,
    redirect: "/order_house/order_house",
    children: [
      {
        path: "order_house",
        component: () => import("@/views/order_house/index"),
        name: "order_house",
        meta: { title: "抢单大厅", icon: "el-icon-files" }
      },
      {
        path: "order_house_detail",
        component: () => import("@/views/order_house/detail"),
        name: "order_house_detail",
        meta: { title: "订单详情", icon: "el-icon-files" },
        hidden:true,
      },
      {
        path: "order_house_takeprice",
        component: () => import("@/views/order_house/takeprice"),
        name: "order_house_takeprice",
        meta: { title: "填写报价", icon: "el-icon-files" },
        hidden:true,
      },
      {
        path: "order_progress",
        name: "order_progress",
        component: () => import("@/views/order_house/progress"),
        meta: { title: "汇报进度", icon: "el-icon-takeaway-box" },
        hidden:true,
      }
    ]
  },
  /// 我的订单
  {
    path: "/myorder",
    component: Layout,
    // redirect: "/myorder/myorder",
    meta: { title: "我的订单", icon: "el-icon-setting" },
    children: [
      {
        path: "myorder",
        component: () => import("@/views/want_order/index"),
        name: "myorder",
        meta: { title: "我要下单", icon: "el-icon-takeaway-box" }
      },
      {
        path: "order01",
        name: "order01",
        component: () => import("@/views/want_order/order_step01"),
        meta: { title: "选择产品", icon: "el-icon-files" },
        hidden:true,
      },
      {
        path: "order02",
        name: "order02",
        component: () => import("@/views/want_order/add"),
        meta: { title: "下单", icon: "el-icon-takeaway-box" },
        hidden:true,
      }
    ]
  },
  ////师傅评价列表////
  {
    path: '/master_comment',
    component: Layout,
    redirect: 'master_comment',
    meta: { title: '师傅评价列表', icon: 'el-icon-setting' },
    children: [
      {
        path: 'master_comment',
        component: () => import('@/views/master_comment/index'),
        name: 'master_comment',
        meta: { title: '师傅评价列表', icon: 'el-icon-setting' },
      },
      {
        path: 'master_comment_detail',
        component: () => import('@/views/master_comment/detail'),
        name: 'master_comment_detail',
        hidden: true,
        meta: { title: '师傅评价', icon: 'el-icon-setting' },
      }
    ]
  },
  /// 我的信息
  {
    path: "/person_info",
    component: Layout,
    redirect: "person_info",
    children: [
      {
        path: "person_info",
        component: () => import("@/views/person_info/index"),
        name: "person_info",
        meta: { title: "个人信息", icon: "el-icon-user" }
      }
    ]
  },
  /// 模版管理
  {
    path: "/templates",
    component: Layout,
    redirect: "templates",
    children: [
      {
        path: "/templates",
        component: () => import("@/views/templates/index"),
        name: "templates",
        meta: { title: "一键加载模板", icon: "dashboard" },
      }
    ]
  }
];

export default userRouter;